<?php
class NoBusinessBase_Helper_Jsonp extends Zend_Controller_Action_Helper_Abstract
{
   public function direct($pObject)
   {
      $pRequest = Zend_Controller_Front::getInstance()->getRequest();
      $callback = $pRequest->getParam('callback', '');
      if($callback == '')
      {
         $pJsonHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('Json');
         $pJsonHelper->direct($pObject);
      }
      else
      {
         echo $callback, '(', Zend_Json::encode($pObject), ');';exit;
      }
      return $this;
   }
}

